<!DOCTYPE html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>我的收藏</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />

    <style>
        html,
        body {
            width: 100%;
            min-height: 100%;
            background: #fff;
        }

        .h20 {
            height: 0.5rem;
            background: #f0f0f0;
        }
        /* 头部样式 */
        #header_top {
            background: #2997e4;
            padding-top: 25px;
        }

        /* 第二头部 */
        #header_top img {height: 1rem;margin-top: 0.5rem;margin-left: 0.75rem;}
        .title {color: #fff;}


        /* 无数据块 */

        .enshrine_wu_box_fiexd {
            position: fixed;
            /*display: none;*/
            left: 0;
            background-color: #fff;
            width: 100%;
            height: 100%;
        }

        .enshrine_wu_box {
            height: 100%;
            display: table;
        }

        .enshrine_wu {
            text-align: center;
            height: 100%;
            display: table-cell;
            vertical-align: middle;
        }

        .enshrine_wu_ico {
            width: 85%;
            margin: 0 auto 1rem;
        }

        .enshrine_wu_txt {
            font-size: 20px;
            color: #4d4d4d;
        }
        /* 数据 */

        .enshrine .aui-list-item-title {
            color: #333;
            line-height: 1.2rem;
            font-size: 0.8rem;
        }

        .enshrine .aui-info-item {
            color: #999;
            font-size: 0.75rem;
        }

        .enshrine .aui-list-item-media {
            width: 6.5rem;
        }
        .enshrine .aui-media-list .aui-list-item-inner {
          display: -webkit-box;
          display: -webkit-flex;
          display: flex;
          -webkit-box-orient: vertical;
          box-orient: vertical;
          -webkit-flex-direction: column;
          flex-direction: column;
          -webkit-box-pack: justify;
          -webkit-justify-content: space-between;
          justify-content: space-between;
          -webkit-box-align: start;
          -webkit-align-items: flex-start;
          align-items: flex-start;
        }
        .enshrine ul li {
          width: 100%;
        }
        .lwlx span {
    			color: #999;
    			margin-right: 1rem;
    			margin-left: 3px;
    		}
    		.lwTitle {
    			margin-bottom: 5px;
    		}


        .itemIco {
          width: 100%;
          height: 4rem;
        }
        .xsTab_box {
          position: relative;
          z-index: 2;
          width: 100%;
          overflow-x: auto;
          background-color: #f0f0f0;
        }
        .xsTab {
          display: block;
          width: auto;
          background-color: #f0f0f0;
        }
        .xsTab::before,
        .xsTab::after {
          content: '';
          display: block;
          height: 0;
          clear: both;
        }
        .xsTab .aui-tab-item {
          border: none;
          position: relative;
          float: left;
          width: auto;
          padding: 0 1rem;
          white-space:nowrap;
          color: #999;
        }
        .xsTab .aui-tab-item:after {
          content: '';
          display: block;
          position: absolute;
          bottom: 0;
          left: 0;
          right: 0;
          width: 50%;
          height: 2px;
          background-color: #f0f0f0;
          margin: auto;
        }
        .xsTab .aui-tab-item.aui-active {
          color: #2997e4;
        }
        .xsTab .aui-tab-item.aui-active:after {
          background: #2997e4;
        }
    		.xsBox {
    			/*display: none;*/
    		}

        .whitebar .del {
          height: 1.2rem;
          width: 1.6rem;
          line-height: 1.2rem;
          font-size: 0.8rem;
          margin-right: 0.75rem;
          margin-top: 0.4rem;
        }
        #finish {
          color: #fff;
          font-size: 0.78rem;
          /*display: none;*/
        }
        .aui-list .aui-list-item-label-icon {
          overflow: hidden;
          min-width: 0;
          padding-right: 2.4em;
          -webkit-transition: all 0.2s;
          transition: all 0.2s;
        }
        .aui-list .aui-list-item-label-icon input {
          position: absolute;
          top: 50%;
          -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
        }
        .aui-list .aui-list-item-label-icon.checkBoxW0 {
          width: 0;
          padding: 0;
        }

            .ml_btns {
              position: fixed;
              bottom: 0;
              width: 100%;
            }
            .ml_btn {
              background: #f0f0f0;
              float: left;
              width: 60%;
              padding: 0.5rem 0 0.5rem 0.75rem;
              text-align: left;
              color: #666;

            }
            .ml_btn input {
              margin-right: 0.5rem;
            }
            .ml_btn:nth-child(2) {
              width: 20%;
              padding: 0.5rem 0;
              text-align: center;
            }
            .ml_btn:nth-child(3) {
              background: #2997e4;
              color: #fff;
              width: 20%;
              text-align: center;
              padding: 0.5rem 0;
            }
            #header_top {
              position: fixed;
              width: 100%;
              top: 0;
              z-index: 99;
            }
            #xsTab {
              position: fixed;
              width: 100%;
              top: 65px;
              z-index: 99;
            }
            body {
              padding-top: 109px;
            }
    </style>
</head>

<body>
<div id="app" v-cloak>
    <header id="header_top" class="aui-bar aui-bar-nav" >

      <a class="aui-pull-left"  onclick="goback()">
          <span class="aui-iconfont aui-icon-left"></span>
      </a>
      <div class="aui-title" id="title">登录</div>
        <a class="aui-pull-right" @click="delOnOff = !delOnOff">
          <img id="delImg" src="../../image/order@3x.png" height="100%" alt="" v-if="!delOnOff">
          <div id="finish" v-else>完成</div>
        </a>
    </header>

    <!-- 无数据时显示 -->
    <div class="enshrine_wu_box_fiexd" v-if="newsList.length == 0">
        <div class="enshrine_wu_box">
            <div class="enshrine_wu">
                <img src="../../image/enshrine_list_wu_ico.png" class="enshrine_wu_ico" alt="">
                <div class="enshrine_wu_txt">还没有收藏...</div>
            </div>
        </div>
    </div>

    <div class="xsTab_box">
      <div class="aui-tab xsTab" id="xsTab">
  	    <!-- <div class="aui-tab-item aui-active">全部</div> -->
        <div class="aui-tab-item aui-active" @click="cid = 0">全部</div>
  	    <div class="aui-tab-item" @click="cid = 1">活动</div>
  	    <!-- <div class="aui-tab-item" @click="cid = 2">视频</div> -->
  	    <div class="aui-tab-item" @click="cid = 3">申报</div>
  	    <div class="aui-tab-item" @click="cid = 4">献策</div>
  	    <div class="aui-tab-item" @click="cid = 5">科研成果</div>
  	  </div>
    </div>


    <div class="xsBox" v-show="cid == 0">
      <div class="aui-content enshrine">
          <ul class="aui-list aui-media-list">
            <li class="aui-list-item" tapmode="presshover" @click="myAllOrderClick(item.type, item.id || item.newsId)" :id="item.id || item.newsId" v-for="item in newsList" v-if="delObj[item.id] || delObj[item.newsId]">
              <!-- type3 -->
                <div class="aui-media-list-item-inner" v-if="item.type == 3">
                  <div class="aui-list-item-label-icon" :class="{checkBoxW0: !delOnOff}">

                      <input class="aui-radio" type="checkbox" v-model="delObj[item.id].bool" name="" @click="delObj[item.id].bool = !delObj[item.id].bool">
                  </div>
                    <div class="aui-list-item-media">
                        <!-- <img :src="item.images"> -->
                        <div v-if="item.images" class="itemIco" :style="'background: url('+ item.images +') center/cover no-repeat'"></div>
                        <div v-else class="itemIco" style="background: url(../../image/banner2@3x.png) center/cover no-repeat"></div>
                    </div>
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-text">
                            <div class="aui-list-item-title">{{item.title}}</div>
                        </div>
                        <div class="aui-info aui-margin-t-5">
                            <div class="aui-info-item">{{item.apply_date}}</div>
                        </div>
                    </div>
                </div>
                <!-- type1 -->
                <div class="aui-media-list-item-inner" v-else-if="item.type == 1">
                  <div class="aui-list-item-label-icon" :class="{checkBoxW0: !delOnOff}">
                      <input class="aui-radio" type="checkbox" v-model="delObj[item.newsId].bool" @click="delObj[item.newsId].bool = !delObj[item.newsId].bool" name="">
                  </div>
                  <div class="aui-media-list-item-inner">
                    <div class="aui-list-item-media">
                      <div v-if="item.pics" class="itemIco" :style="'background: url('+ item.pics +') center/cover no-repeat'"></div>
                      <div v-else class="itemIco" style="background: url(../../image/firstpage/t2@3x.png) center/cover no-repeat"></div>
                    </div>
                    <div class="aui-list-item-inner">
                      <div class="aui-list-item-text">
                        <div class="aui-list-item-title">{{item.title}}</div>
                      </div>
                      <div class="aui-info aui-margin-t-5" style="padding:0">
                        <div class="aui-info-item">{{item.createTime}}</div>
                      </div>
                    </div>
                  </div>
                </div>

                <!-- type2 -->
                <div class="aui-media-list-item-inner" v-else-if="item.type == 2">
                  <div class="aui-list-item-label-icon" :class="{checkBoxW0: !delOnOff}">
                      <input class="aui-radio" type="checkbox" v-model="delObj[item.id].bool" @click="delObj[item.id].bool = !delObj[item.id].bool" name="">
                  </div>
                    <div class="aui-list-item-media">
                        <!-- <img :src="item.image"> -->
                        <div v-if="item.image" class="itemIco" :style="'background: url('+ item.image +') center/cover no-repeat'"></div>
                        <div v-else class="itemIco" style="background: url(../../image/banner2@3x.png) center/cover no-repeat"></div>
                    </div>
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-text">
                            <div class="aui-list-item-title">{{item.title}}</div>
                        </div>
                        <div class="aui-info aui-margin-t-5">
                            <div class="aui-info-item">{{item.place}}</div>
                        </div>
                    </div>
                </div>
            </li>
          </ul>
      </div>
    </div>

      <div class="xsBox" v-show="cid == 1">
        <div class="aui-content enshrine">
            <ul class="aui-list aui-media-list">
              <li class="aui-list-item" tapmode="presshover" @click="myOrderClick('activitydetails','活动', item.id)" :id="item.id" v-for="item in newsList" v-if="delObj[item.id]">
                  <div class="aui-media-list-item-inner">
                    <div class="aui-list-item-label-icon" :class="{checkBoxW0: !delOnOff}">
                        <input class="aui-radio" type="checkbox" v-model="delObj[item.id].bool" name="" @click="delObj[item.id].bool = !delObj[item.id].bool">
                    </div>
                      <div class="aui-list-item-media">
                          <!-- <img :src="item.images"> -->
                          <div v-if="item.images" class="itemIco" :style="'background: url('+ item.images +') center/cover no-repeat'"></div>
                          <div v-else class="itemIco" style="background: url(../../image/banner2@3x.png) center/cover no-repeat"></div>
                      </div>
                      <div class="aui-list-item-inner">
                          <div class="aui-list-item-text">
                              <div class="aui-list-item-title">{{item.title}}</div>
                          </div>
                          <div class="aui-info aui-margin-t-5">
                              <div class="aui-info-item">{{item.apply_date}}</div>
                          </div>
                      </div>
                  </div>
              </li>
            </ul>
        </div>
      </div>

      <!-- <div class="xsBox" v-show="cid == 2">
        {{cid}}
      </div> -->

      <div class="xsBox" v-show="cid == 3">
        <div class="aui-content enshrine">
  			 <ul class="aui-list aui-media-list">
           <li class="aui-list-item" @click="myOrderClick('index_detail_shenb','申报', item.newsId)" :id="item.newsId" v-for="item in newsList" v-if="delObj[item.newsId]">
             <div class="aui-media-list-item-inner">
               <div class="aui-list-item-label-icon" :class="{checkBoxW0: !delOnOff}">
                   <input class="aui-radio" type="checkbox" v-model="delObj[item.newsId].bool" @click="delObj[item.newsId].bool = !delObj[item.newsId].bool" name="">
               </div>
               <div class="aui-media-list-item-inner">
                 <div class="aui-list-item-media">
                   <div v-if="item.pics" class="itemIco" :style="'background: url('+ item.pics +') center/cover no-repeat'"></div>
                   <div v-else class="itemIco" style="background: url(../../image/firstpage/t2@3x.png) center/cover no-repeat"></div>
                 </div>
                 <div class="aui-list-item-inner">
                   <div class="aui-list-item-text">
                     <div class="aui-list-item-title">{{item.title}}</div>
                   </div>
                   <div class="aui-info aui-margin-t-5" style="padding:0">
                     <div class="aui-info-item">{{item.createTime}}</div>
                   </div>
                 </div>
               </div>
             </div>
           </li>
  			 </ul>
  			</div>
      </div>

      <div class="xsBox" v-show="cid == 4">
        <div class="aui-content enshrine">
  			 <ul class="aui-list aui-media-list">
           <li class="aui-list-item" @click="myOrderClick('index_detail_xc','献策', item.newsId)" :id="item.newsId" v-for="item in newsList" v-if="delObj[item.newsId]">
             <div class="aui-media-list-item-inner">
               <div class="aui-list-item-label-icon" :class="{checkBoxW0: !delOnOff}">
                   <input class="aui-radio" type="checkbox"  v-model="delObj[item.newsId].bool" @click="delObj[item.newsId].bool = !delObj[item.newsId].bool" name="">
               </div>
               <div class="aui-media-list-item-inner">
                 <div class="aui-list-item-media">
                   <div v-if="item.pics" class="itemIco" :style="'background: url('+ item.pics +') center/cover no-repeat'"></div>
                   <div v-else class="itemIco" style="background: url(../../image/firstpage/t2@3x.png) center/cover no-repeat"></div>
                 </div>
                 <div class="aui-list-item-inner">
                   <div class="aui-list-item-text">
                     <div class="aui-list-item-title">{{item.title}}</div>
                   </div>
                   <div class="aui-info aui-margin-t-5" style="padding:0">
                     <div class="aui-info-item">{{item.createTime}}</div>
                   </div>
                 </div>
               </div>
             </div>
           </li>
  			 </ul>
  			</div>
      </div>

      <div class="xsBox" v-show="cid == 5">
        <div class="aui-content enshrine">
            <ul class="aui-list aui-media-list">
              <li class="aui-list-item" tapmode="presshover" @click="myOrderClick('index_cx_need','科研成果', item.id)" :id="item.id" v-for="item in newsList" v-if="delObj[item.id]">
                  <div class="aui-media-list-item-inner">
                    <div class="aui-list-item-label-icon" :class="{checkBoxW0: !delOnOff}">
                        <input class="aui-radio" type="checkbox" v-model="delObj[item.id].bool" @click="delObj[item.id].bool = !delObj[item.id].bool" name="">
                    </div>
                      <div class="aui-list-item-media">
                          <!-- <img :src="item.image"> -->
                          <div v-if="item.image" class="itemIco" :style="'background: url('+ item.image +') center/cover no-repeat'"></div>
                          <div v-else class="itemIco" style="background: url(../../image/banner2@3x.png) center/cover no-repeat"></div>
                      </div>
                      <div class="aui-list-item-inner">
                          <div class="aui-list-item-text">
                              <div class="aui-list-item-title">{{item.title}}</div>
                          </div>
                          <div class="aui-info aui-margin-t-5">
                              <div class="aui-info-item">{{item.place}}</div>
                          </div>
                      </div>
                  </div>
              </li>
            </ul>
        </div>
      </div>

        <div class="ml_btns" v-if="delOnOff">
          <div class="ml_btn">
              <!-- <input class="aui-radio" type="checkbox" name="">全选 -->
              <div class="aui-list-item-label-icon">
                  <input class="aui-radio" type="checkbox" @click="all" :checked="allChecked" name="">全选
              </div>
          </div>
          <div class="ml_btn" @click="cancel">
            取消
          </div>
          <div class="ml_btn" @click="del">
            删除
          </div>
        </div>
</div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/zepto.js"></script>
<script type="text/javascript" src="../../script/aui-scroll.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/utils.js"></script>
<script src="../../script/aui-tab.js"></script>
<script type="text/javascript">
apiready = function() {
$api.byId('title').innerHTML = api.pageParam.title;
// console.log($api.getStorage('token'))
  var app = new Vue({
    el: '#app',
    data: {
      newsList: [],
      token: '',
      code: 1,
			page: 1,
			totalpage: 0,
      thatUrl: '',
      thatUrl2: '',
      cid: 0,
      delOnOff: false,
      delObj: {},
      allChecked: false
    },
    created: function() {
      var $_this = this;
      $_this.token = $api.getStorage('token') || '';
      if(!$api.getStorage('token')){
        api.confirm( {
            title: '是否登录',
            msg: '确认是否登录？',
            buttons: [ '确定', '取消' ]
          }, function ( ret, err ) {
            var index = ret.buttonIndex;
            if ( index == 1 ) {
              api.openWin({
                name: 'login',
                url: '../five_frame/login_header.html',
                delay: 200,
                bounces: false
              });
              return;
            } else {
              api.closeWin({
                  name: name
              });
              return
            }
          })
          return
        }
      $_this.thatUrl = window.Url.getCollectByUser
      $_this.thatUrl2 = window.Url.deleteCollect


     var scroll = new auiScroll({
         listen:true, //是否监听滚动高度，开启后将实时返回滚动高度
         distance:40 //判断到达底部的距离，isToBottom为true
     },function(ret){
        if (ret.isToBottom && $_this.page) {
          $_this.page ++
          if ($_this.page > $_this.totalpage) {
            $_this.page = $_this.totalpage
            return
          }
          api.ajax({
           url: $_this.thatUrl + $_this.page,
           timeout: 300,
         }, function(ret, err) {
             if (ret) {
                //  api.alert({ msg: JSON.stringify(ret) });
                 $_this.newsList = $_this.newsList.concat(ret.data.newsList)

             } else {
                 api.alert({ msg: JSON.stringify(err) });
             }
         })
        }

     });
    },
    methods: {
      openLogin:function (){
				api.openWin({
					name: 'login',
					url: './login_header.html',
					bounces: false,
					delay:200
				});
			},
      myOrderClick: function (type, title, id) {
        if (this.delOnOff) {
          this.delObj[id].bool = !this.delObj[id].bool
          this.delObj = Object.assign({},this.delObj)
          // api.alert({msg: this.delObj})
        } else {
          api.openWin({
            name: type,
            pageParam: {
              name: type,
              title: title,
              id: id
            },
            url: '../first_frame/' + type + '.html',
            delay: 200,
            bounces: false
          });
        }
      },
      myAllOrderClick: function (type, id) {
        var $_this = this
        if (type == 1) {
          $_this.myOrderClick('index_detail_xc', '文章详情', id)
        } else if (type == 2) {
          $_this.myOrderClick('index_cx_need', '详情', id)
        } else if (type == 3) {
          $_this.myOrderClick('activitydetails', '活动详情', id)
        }
      },
      del: function (){
        for (var key in this.delObj) {
          if (this.delObj[key].bool) {
            for(var i = 0; i < this.newsList.length; i++) {
              if (this.newsList[i].newsId == key || this.newsList[i].id == key) {
                this.newsList.splice(i, 1)
              }
            }
            if(this.cid == 0) {
              api.ajax({
               url: this.thatUrl2,
               timeout: 300,
               method: 'post',
               headers: {
                 'Content-Type': 'application/json',
                 'baseParams': this.token
               },
               data: {
                 body: {
                   list:[{
                     id: key,
                     type: this.delObj[key].type
                   }]
                 }
               }
             }, function(ret, err) {
                 if (ret) {
                    //  api.alert({ msg: JSON.stringify(ret) });
                 } else {
                     api.alert({ msg: JSON.stringify(err) });
                 }
             })
            } else {
              api.ajax({
               url: this.thatUrl2 + key,
               timeout: 300,
               headers: {
                 'baseParams': this.token
               },
             }, function(ret, err) {
                 if (ret) {
                    //  api.alert({ msg: JSON.stringify(ret.message) });
                 } else {
                     api.alert({ msg: JSON.stringify(err) });
                 }
             })
            }

          }
        }
      },
      cancel: function () {
        this.delOnOff = false
      },
      all: function (){
        this.allChecked = !this.allChecked
        if (this.allChecked) {
          for(var key in this.delObj) {
            this.delObj[key].bool = true
          }
          this.delObj = Object.assign({},this.delObj)
        } else {
          for(var key in this.delObj) {
            this.delObj[key].bool = false
          }
          this.delObj = Object.assign({},this.delObj)
        }
      }
    },
    watch: {
      cid: function () {
        if (this.cid == 0) {
          this.thatUrl = window.Url.getCollectByUser
          this.thatUrl2 = window.Url.deleteCollect
        }else if (this.cid == 1) {
          this.thatUrl = window.Url.getActivityCollectList
          this.thatUrl2 = window.Url.cancelActivityCollect
        } else if (this.cid == 2) {
          this.thatUrl = window.Url.getActivityCollectList
          this.thatUrl2 = window.Url.cancelActivityCollect
        } else if (this.cid == 3) {
          this.thatUrl = window.Url.getArticleCollectList + '1/'
          this.thatUrl2 = window.Url.cancelArticleCollect
        } else if (this.cid == 4) {
          this.thatUrl = window.Url.getArticleCollectList + '3/'
          this.thatUrl2 = window.Url.cancelArticleCollect
        } else if (this.cid == 5) {
          this.thatUrl = window.Url.getScientificLikeList
          this.thatUrl2 = window.Url.cancelScientificLike
        }
      },
      thatUrl: function () {
        var $_this = this

        if ($_this.cid == 0) {
          $_this.page = ''
        } else {
          $_this.page = 1
        }
        $_this.delObj = {}
        $_this.delOnOff = false
        api.ajax({
         url: $_this.thatUrl + $_this.page,
         method: 'GET',
         headers: {
             'baseParams':$_this.token
         },
         timeout: 300,
       }, function(ret, err) {
           if (ret) {
             if (ret.code == 2) {
                 alert('用户未登录，请返回登录')
                 $api.rmStorage('token')
                 $api.rmStorage('data')
                 goback()
                  return
               }
            //  api.alert({ msg: JSON.stringify(ret) });
            if ($_this.cid == 0) {
              // api.alert({ msg: JSON.stringify(ret) });
              if (ret.code == 0) {
                $_this.newsList = ret.data
                //  api.alert({ msg: JSON.stringify($_this.newsList) });
                 for (var i = 0; i < $_this.newsList.length; i++) {
                   if ($_this.newsList[i].newsId) {
                     $_this.delObj[$_this.newsList[i].newsId] = {}
                     $_this.delObj[$_this.newsList[i].newsId].bool = false
                     $_this.delObj[$_this.newsList[i].newsId].type = $_this.newsList[i].type
                  } else {
                    $_this.delObj[$_this.newsList[i].id] = {}
                     $_this.delObj[$_this.newsList[i].id].bool = false
                     $_this.delObj[$_this.newsList[i].id].type = $_this.newsList[i].type
                  }
                 }
                //  api.alert({msg:$_this.delObj})
              } else {
                $_this.newsList = []
                $_this.delObj = {}
              }
            } else {
              if (ret.code == 0) {
                $_this.totalpage = ret.data.totalpage
                $_this.newsList = ret.data.newsList
                 // api.alert({ msg: JSON.stringify($_this.newsList) });
                 for (var i = 0; i < $_this.newsList.length; i++) {
                   if ($_this.newsList[i].newsId) {
                    $_this.delObj[$_this.newsList[i].newsId] = {}
                     $_this.delObj[$_this.newsList[i].newsId].bool = false
                  } else {
                   $_this.delObj[$_this.newsList[i].id] = {}
                    $_this.delObj[$_this.newsList[i].id].bool = false
                  }
                 }
                //  api.alert({msg:$_this.delObj})
              } else {
                $_this.totalpage = 1
                $_this.newsList = []
                $_this.delObj = {}
              }
            }


              // api.alert({ msg: JSON.stringify($_this.delObj) });
           } else {
               api.alert({ msg: JSON.stringify(err) });
           }
       })
     },
     delObj: function () {
       for(var key in this.delObj) {
         this.allChecked = true
         if (!this.delObj[key].bool) {
           this.allChecked = false
           return
         }
       }
     }
    },
    mounted: function () {
      var xsBox = document.querySelectorAll('.aui-tab-item')
      var xsTabW = 0
      for (var i = 0; i < xsBox.length; i++) {
        xsTabW += xsBox[i].offsetWidth
      }
      document.getElementById("xsTab").style.width = xsTabW + 'px'
      var tab = new auiTab({
        element:document.getElementById("xsTab"),
        index:1,
        repeatClick:false
      },function(ret){
        var xsBox = document.querySelectorAll('.xsBox')

        for (var i = 0; i < xsBox.length; i++) {
          xsBox[i].style.display = 'none'
        }
      })
    }
  })
}

  function goback () {
    api.closeWin({name:api.pageParam.name});
  }


</script>
</html>
